package com.example.liangxiao.testoom;

import android.app.Application;
import android.content.Context;

import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;

/**
 * Created by liangxiao on 2017/7/17.
 */

public class AppApplication extends Application {

    public static RefWatcher getRefWatcher(Context context) {
        AppApplication exampleApplication = (AppApplication) context.getApplicationContext();
        return exampleApplication.mRefWatcher;
    }

    private RefWatcher mRefWatcher;

    @Override
    public void onCreate() {
        super.onCreate();
        mRefWatcher = LeakCanary.install(this);
    }
}
